
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@fylgja/details
Advanced tools
The details component enhances the default details behavior.
npm install @fylgja/details
Then include the component in to your code via;
@use "@fylgja/details";
// Or via PostCSS import
@import "@fylgja/details";
Out of the box all the styling is done directly, so no extra steps are needed.
And the details element wil look relativity the same as the browser default.
The style should be changeable for many purposes, think a sub menu toggle or a accordion.
As with almost all of our components, CSS variables can be configured to add your own look/style.
Want direct control on the base styles, here are the following SCSS variables can you modify.
$details-animation: details-show 200ms ease-in-out !default;
$details-margin: 1em 0 !default;
If you need the common accordion style you can use the Card component, and a little extra CSS.
<style>
.accordion {
--card-elevation: none;
--card-border: 1px solid #ccc;
--card-padding: 0.5em 0.8em;
}
.accordion > details:first-of-type {
border-radius: 4px 4px 0 0;
margin-bottom: 0;
}
.accordion > details:last-of-type {
border-radius: 0 0 4px 4px;
margin-top: 0;
}
.accordion > details:not(:last-of-type) {
border-bottom: 0;
}
.accordion > details:not(:first-of-type):not(:last-of-type) {
border-radius: 0;
margin-top: 0;
margin-bottom: 0;
}
</style>
<div class="accordion">
<details class="card">
<summary class="card-action">Details element 1</summary>
<div class="card-content pt-0">..</div>
</details>
<details class="card">
<summary class="card-action">Details element 2</summary>
<div class="card-content pt-0">..</div>
</details>
<details class="card">
<summary class="card-action">Details element 3</summary>
<div class="card-content pt-0">..</div>
</details>
</div>
FAQs
The Fylgja details component
The npm package @fylgja/details receives a total of 18 weekly downloads. As such, @fylgja/details popularity was classified as not popular.
We found that @fylgja/details demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.